Imports SchemaCodeGen

Partial Class pages_DriverTypes_DriverType : Inherits CPage

#Region "Querystring"
	Public ReadOnly Property DriverId() As Integer
		Get
			Dim id As Integer = CWeb.RequestInt("driverId")
			If id = Integer.MinValue Then CSitemap.RecordNotFound("DriverType", id)
			Return id
		End Get
	End Property
#End Region

#Region "Data"
	Public ReadOnly Property [DriverType]() As CDriverType
		Get
			Dim d As CDriverType = CDriverType.Cache.GetById(DriverId)
			If IsNothing(d) Then CSitemap.RecordNotFound("DriverType", DriverId)
			Return d
		End Get
	End Property
#End Region

#Region "Event Handlers - Page"
	Protected Overrides Sub PageLoad()
		With Me.DriverType
			txtDriverName.Text = .DriverName
			txtUsage.Text = CUtilities.CountSummary(.Connections, "project", "none")
			'txtUsage.NavigateUrl = CSitemap.Connections(.DriverId)
		End With
	End Sub
#End Region

End Class
